package com.spa.application.dto.admin;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.spa.infrastructure.enums.dict.order.OrderStatusEnum;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
@JsonInclude
public class AdminWithdrawOrderDetailDTO {

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long orderId;

    private String orderNo;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date orderTime;

    private String serviceName;

    private String serviceAddress;

    private OrderStatusEnum orderStatus;

    @JsonIgnore
    private String orderTotalPrice;

    private String servicePrice;

    private String travelPrice;

    private Double percent;

    private Float income;

    private String discount;

    @JsonIgnore
    private String userName;

    @JsonIgnore
    private String userPhone;

    private String massagistName;

    private String massagistPhone;

    @JsonIgnore
    private Boolean transferFlag;

    @JsonIgnore
    private String shopName;

    private List<Ext> extList;

    private Integer totalIncome;


    @Data
    @JsonInclude
    public static class Ext {

        @JsonIgnore
        private Long orderId;

        @JsonIgnore
        private Long id;

        private String serviceName;

        private String extraServiceDuration;

        private String extraServicePrice;

        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private Date startTime;

        private Float income;

        private Double percent;
    }

}
